package easy;

/**
 * @author admin
 * 1662. 检查两个字符串数组是否相等
 * 解题思路：拼接起来直接比较即可
 */
public class LeeCode1662 {

    public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
        String res1 = "";
        String res2 = "";
        for (String s : word1) {
            res1 = res1 + s;
        }
        for (String s : word2) {
            res2 = res2 + s;
        }
        return res1.equals(res2);
    }

    public static void main(String[] args) {
        System.out.println(new LeeCode1662().arrayStringsAreEqual(new String[]{"ab", "c"}, new String[]{"a", "bc"}));
    }
}
